import request from '@/utils/request'

// 查询商品秒杀设置列表
export function listSeckill(query) {
  return request({
    url: '/system/seckill/list',
    method: 'get',
    params: query
  })
}

// 查询商品秒杀设置详细
export function getSeckill(goodId) {
  return request({
    url: '/system/seckill/' + goodId,
    method: 'get'
  })
}

// 新增商品秒杀设置
export function addSeckill(data) {
  return request({
    url: '/system/seckill',
    method: 'post',
    data: data
  })
}

// 修改商品秒杀设置
export function updateSeckill(data) {
  return request({
    url: '/system/seckill',
    method: 'put',
    data: data
  })
}

// 删除商品秒杀设置
export function delSeckill(goodId) {
  return request({
    url: '/system/seckill/' + goodId,
    method: 'delete'
  })
}
